<?php 
/****
布尔教育 高端PHP培训
培  训: http://www.itbool.com
论  坛: http://www.zixue.it
****/

class Ad{
	public $rand;
	static public $ob = null;
	final function __construct(){
		$this->rand = mt_rand(100000,9999999999);
	}

	static public function getins(){
		if(self::$ob === null) {
		 self::$ob = new self();
		}
		return self::$ob;
	}
}

var_dump(Ad::getins());


?>